From 93303de996580469b30cd47ebb4b608323b3dabd Mon Sep 17 00:00:00 2001 From: Jimi Xenidis Date: Fri, 15 Dec 2006 08:16:56 -0500 Subject: [PATCH] [XEN][POWERPC] Normalize timbase_freq to a 64bit value Signed-off-by: Jimi Xenidis Signed-off-by: Hollis Blanchard --HG-- extra : transplant_source : %20%BD%3B%7Bu%19%E0%1F%7Bk%FA%97%C7%A6U%E1%DC%02%7F%5D --- xen/arch/powerpc/boot_of.c | 7 ++++--- xen/arch/powerpc/time.c | 2 +- xen/include/asm-powerpc/time.h | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/xen/arch/powerpc/boot_of.c b/xen/arch/powerpc/boot_of.c index bcea9c03f5..88c7d497be 100644 --- a/xen/arch/powerpc/boot_of.c +++ b/xen/arch/powerpc/boot_of.c @@ -1206,6 +1206,7 @@ static int __init boot_of_cpus(void) s32 cpuid; u32 cpu_clock[2]; extern uint cpu_hard_id[NR_CPUS]; + u32 tbf; /* Look up which CPU we are running on right now and get all info * from there */ @@ -1220,12 +1221,12 @@ static int __init boot_of_cpus(void) cpu_node = bootcpu_node; - result = of_getprop(cpu_node, "timebase-frequency", &timebase_freq, - sizeof(timebase_freq)); + result = of_getprop(cpu_node, "timebase-frequency", &tbf, sizeof(tbf)); + timebase_freq = tbf; if (result == OF_FAILURE) { of_panic("Couldn't get timebase frequency!\n"); } - of_printf("OF: timebase-frequency = %d Hz\n", timebase_freq); + of_printf("OF: timebase-frequency = %ld Hz\n", timebase_freq); result = of_getprop(cpu_node, "clock-frequency", &cpu_clock, sizeof(cpu_clock)); diff --git a/xen/arch/powerpc/time.c b/xen/arch/powerpc/time.c index 8f6bc70bda..e822af53e5 100644 --- a/xen/arch/powerpc/time.c +++ b/xen/arch/powerpc/time.c @@ -32,7 +32,7 @@ static int cpu_has_hdec = 1; ulong ticks_per_usec; unsigned long cpu_khz; -unsigned int timebase_freq; +s64 timebase_freq; s_time_t get_s_time(void) { diff --git a/xen/include/asm-powerpc/time.h b/xen/include/asm-powerpc/time.h index a872d3fd03..239d93f357 100644 --- a/xen/include/asm-powerpc/time.h +++ b/xen/include/asm-powerpc/time.h @@ -27,7 +27,7 @@ #include #include -extern unsigned int timebase_freq; +extern s64 timebase_freq; #define CLOCK_TICK_RATE timebase_freq #define watchdog_disable() ((void)0) -- 2.30.2